import logging,yagmail
def log_set():
    logging.basicConfig(filename='log.txt',filemode='w+',level=logging.DEBUG,format='%(levelname)s->%(asctime)s->%(message)s')
def send_yagmail(filepath):
    mail=yagmail.SMTP(user='264325917@qq.com',password='',host='smtp.qq.com')
    mail.send(to='264325917@qq.com',subject='测试报告',contents='今日报告，请查看',attachments=filepath)